Skip to content

prevent error with negative time to break in tray icon#1635

Merged
hovancik merged 1 commit into
trunkfrom
fix/tit
Sep 3, 2025
Merged

prevent error with negative time to break in tray icon#1635
hovancik merged 1 commit into
trunkfrom
fix/tit

Conversation

@hovancik
Copy link
Copy Markdown
Owner

@hovancik hovancik commented Sep 3, 2025

Happens sometimes on Win when PC is locked/unlocked.

@hovancik hovancik requested a review from Copilot September 3, 2025 07:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an error that occurs when the time to break becomes negative, which can happen on Windows when the PC is locked/unlocked. The fix prevents negative time values from being used in the tray icon filename generation.

  • Adds a check to prevent negative time values from being included in tray icon names
  • Includes test coverage for the new negative time handling
  • Updates changelog to document the fix

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
app/utils/appIcon.js Adds condition to check for negative timeToBreak values in tray icon logic
test/appIcon.js Adds test case to verify negative timeToBreak handling
CHANGELOG.md Documents the bug fix in the changelog
.github/copilot-instructions.md Updates coding guidelines about comments

Comment thread app/utils/appIcon.js
@hovancik hovancik merged commit 6dfd45e into trunk Sep 3, 2025
9 checks passed
@hovancik hovancik deleted the fix/tit branch September 3, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants